package com.balance.anole.common.service;

import java.util.List;
import java.util.Map;

import com.balance.anole.common.to.CodeLookTO;
import com.balance.anole.common.to.NavigatePerTypeTO;
import com.balance.anole.common.to.NavigateTO;
import com.balance.anole.common.to.PermissionTypeTO;
import com.balance.anole.common.to.ReportMappingTO;

public interface CommonService {
	
	/**
	 * Get codes definitions by passing code type ids. Return results in a Map
	 * with code type id as key and codes value list as value.
	 * 
	 * @param codeTypeIds
	 * @return
	 */
	public Map<String,List<CodeLookTO>> getCodeLooksByCodeTypes(String[] codeTypeIds);
	
	/**
	 * insert codeLookTO
	 * 
	 * @param codeLookTO
	 */
	public void insertOrupdateCodeLookTO(CodeLookTO codeLookTO);
	
	/**
	 * @param codeType
	 * @return
	 */
	public List<CodeLookTO> listCodeLookTOByType(String codeType);
	
	/**
	 * @param paramMap
	 * @return
	 */
	public List<CodeLookTO> listCodeLook(Map<String,Object> paramMap);
	
	/**
	 * Get CodeLookTO by id
	 * 
	 * @param id
	 * @return
	 */
	public CodeLookTO getCodeLookTOByCodeTypeAndCodeId(String codeTypeId,String codeId);
	
	
	/**
	 * @param id
	 * @return
	 */
	public CodeLookTO getCodeLookTO(String id);
	
	/**
	 * insert reportMappingTO
	 * 
	 * @param reportMappingTO
	 */
	public void insertOrupdateReportMappingTO(ReportMappingTO reportMappingTO);
	
	/**
	 * @param moduleId
	 * @return
	 */
	public List<ReportMappingTO> listReportMappingTOByModuleId(String moduleId);
	
	/**
	 * @param navigateTO
	 */
	public void insertOrupdateNavigateTO(NavigateTO navigateTO);
	
	/**
	 * @param funId
	 * @return
	 */
	public NavigateTO getNavigateTO(String funId);
	
	/**
	 * @return
	 */
	public List<NavigateTO> listAllNavigateTO();
	
	public List<Object[]> getSelectList(String displayId,String displayName,String table,String whereId,String whereValue);

	/*======================== PermissionType Manage ========================*/
	public void insertOrupdatePermissionTypeTO(PermissionTypeTO perType);
	
	public PermissionTypeTO getPermissionType(Integer id);
	
	public PermissionTypeTO getPermissionTypeByAction(String action);
	
	public List<PermissionTypeTO> getCandidatePerTypeList();
	
	/*======================== NavigatePerType Manage ========================*/
	public void insertOrupdateNavigatePerTypeTO(NavigatePerTypeTO navPT);
	
	public NavigatePerTypeTO getNavigatePerType(Integer id);
	
	public NavigatePerTypeTO getNavigatePerType(String navUrl, String action);
}
